The Peripheral Component Interconnect Special Interest Group (PCI-SIG) is a non-profit electronics industry consortium responsible for specifying Peripheral Component Interconnect Express (PCIe) standards. One standard specified by PCI-SIG is the PCIe Base 2.0 specification. The PCIe Base 2.0 specification specifies a credit-based, flow-control protocol for transmitting packets between endpoints connected to a PCIe bus. According to the PCIe Base 2.0 specification, a packet should be transmitted to an endpoint only when the endpoint is able to accept the packet. In this way, retransmission of a packet to an endpoint is avoided when the endpoint is not currently able to accept the packet.
In one type of packet switch including a PCIe bus, the packet switch allocates credits indicating the ability of an ingress port of the packet switch to accept a packet. In turn, the ingress port makes the credits available to an endpoint external to the packet switch by transmitting a flow control packet to the endpoint. In this way, the ingress port advertizes the credits to the endpoint. Further, the packet switch employs a timer-based scheme in which the ingress port periodically transmits a flow control packet indicating whether any additional credits are available to the endpoint. The endpoint determines based on the flow control packets whether the ingress buffer is able to accept a packet. Moreover, the endpoint consumes one or more of the available credits for each packet transmitted from the endpoint to the ingress port of the packet switch.
Generally, credit starvation occurs when the endpoint does not have sufficient credits available for transmitting a packet to the ingress port. Moreover, the maximum interval is selected to avoid credit starvation at the endpoint regardless of the size or number of packets transmitted from the endpoint to the ingress port. As a result, the ingress port may send more flow control packets to the endpoint than are needed to avoid credit starvation in the endpoint. The flow control packets, however, consume bandwidth of the ingress port, which may otherwise be utilized for transmitting other packets from the ingress port to the endpoint.